Repository navigation
Mark interface methods abstract when read from source - #886
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
=========================================
Coverage 99.70% 99.70%
- Complexity 1951 1952 +1
=========================================
Files 146 146
Lines 4459 4459
=========================================
Hits 4446 4446
Misses 13 13 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An interface method's
MethodInfonow says it is abstract when it is read from source, as it already did when read through reflection. PHP marks every interface method abstract (php-srczend_compile.c,zend_begin_method_decl:if (in_interface) … fn_flags |= ZEND_ACC_ABSTRACT), andBuiltinBackendreports that throughReflectionMethod::isAbstract().ParsedDeclarationSourceread only theabstractmodifier, which interface methods never carry, so the same declaration differed by where it came from (ADR 0006).Behavior
Hover on an interface method declared in the project now shows
abstract, as it already did for built-in interfaces such asCountable::count().Why now
Upcoming work on which members an access may reach (#881) rejects abstract methods called through
Foo::,self::orparent::, as PHP does. That needs the flag to be right wherever the method was read from.🤖 Generated with Claude Code